package com.simple.security.config;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.web.filter.authz.PermissionsAuthorizationFilter;
import org.springframework.stereotype.Component;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

@Component("urlFilter")
public class UrlFilter extends PermissionsAuthorizationFilter{


	@Override
	public boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws IOException {
		HttpServletRequest req = (HttpServletRequest)request;
		String curUrl = req.getServletPath();
		Subject subject = SecurityUtils.getSubject();
		//自己定义拦截特别的路径拦截
		
		return true;
	}
	

}
